From d0075fbd74ed52a92f1f1dded45d2487174195bf Mon Sep 17 00:00:00 2001 From: justbur Date: Sun, 10 Apr 2016 15:05:02 -0400 Subject: [PATCH] Support key ranges below top level --- which-key.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/which-key.el b/which-key.el index d0052e38c85..ce4dd749dc7 100644 --- a/which-key.el +++ b/which-key.el @@ -1420,6 +1420,15 @@ alists. Returns a list (key separator description)." (string-match (format "^%s[ \t]\\([^ \t]+\\)[ \t]+$" key-str-qt) key)) (unless (assoc-string (match-string 1 key) bindings) (push (cons (match-string 1 key) binding) bindings))) + ((and which-key--current-prefix + (string-match + (format + "^%s[ \t]\\([^ \t]+\\) \\.\\. %s[ \t]\\([^ \t]+\\)[ \t]+$" + key-str-qt key-str-qt) key)) + (let ((stripped-key + (concat (match-string 1 key) " \.\. " (match-string 2 key)))) + (unless (assoc-string stripped-key bindings) + (push (cons stripped-key binding) bindings)))) ((string-match "^\\([^ \t]+\\|[^ \t]+ \\.\\. [^ \t]+\\)[ \t]+$" key) (unless (assoc-string (match-string 1 key) bindings) (push (cons (match-string 1 key) binding) bindings))))))))) -- 2.30.2